{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Manipulate time-series\n",
    "\n",
    "The purpose of this document is to show how to easily access raw contract data, plus simple manipulation functions that you'd expect to find if you're trading future contracts (example: contract series stitching, term structure etc)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 97,
   "metadata": {},
   "outputs": [],
   "source": [
    "import trading.portfolio as portfolio\n",
    "p = portfolio.Portfolio(instruments=config.portfolios.p_trade)\n",
    "i = p.instruments"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "#### List all valid instruments available\n",
    "\n",
    "Each value in the returned dictionary is one instance of `core.instrument.Instrument`"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 98,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "{'arabica': arabica,\n",
       " 'aud': aud,\n",
       " 'bobl': bobl,\n",
       " 'bund': bund,\n",
       " 'cattle': cattle,\n",
       " 'cocoa': cocoa,\n",
       " 'copper': copper,\n",
       " 'corn': corn,\n",
       " 'cotton': cotton,\n",
       " 'crude': crude,\n",
       " 'eur': eur,\n",
       " 'eurodollar': eurodollar,\n",
       " 'eurooat': eurooat,\n",
       " 'eurostoxx': eurostoxx,\n",
       " 'feeder': feeder,\n",
       " 'gas': gas,\n",
       " 'gbp': gbp,\n",
       " 'gold': gold,\n",
       " 'hsi': hsi,\n",
       " 'leanhog': leanhog,\n",
       " 'longbtp': longbtp,\n",
       " 'mxp': mxp,\n",
       " 'nasdaq': nasdaq,\n",
       " 'nzd': nzd,\n",
       " 'oats': oats,\n",
       " 'pallad': pallad,\n",
       " 'platinum': platinum,\n",
       " 'robusta': robusta,\n",
       " 'silver': silver,\n",
       " 'smi': smi,\n",
       " 'soybean': soybean,\n",
       " 'soymeal': soymeal,\n",
       " 'soyoil': soyoil,\n",
       " 'sugar': sugar,\n",
       " 'us2': us2,\n",
       " 'us30': us30,\n",
       " 'vix': vix,\n",
       " 'vstoxx': vstoxx,\n",
       " 'wheat': wheat,\n",
       " 'yen': yen}"
      ]
     },
     "execution_count": 98,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "p.valid_instruments()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "#### For each name we can see all contracts associated with each symbol\n",
    "\n",
    "Columns are `OHLCV`. Index has two levels. First level is the contract name, second is a date."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 99,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th>close</th>\n",
       "      <th>high</th>\n",
       "      <th>low</th>\n",
       "      <th>open</th>\n",
       "      <th>volume</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>contract</th>\n",
       "      <th>date</th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th rowspan=\"5\" valign=\"top\">199309</th>\n",
       "      <th>1993-09-01</th>\n",
       "      <td>1336.0</td>\n",
       "      <td>1338.0</td>\n",
       "      <td>1313.0</td>\n",
       "      <td>1320.0</td>\n",
       "      <td>560.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1993-09-02</th>\n",
       "      <td>1339.0</td>\n",
       "      <td>1345.0</td>\n",
       "      <td>1330.0</td>\n",
       "      <td>1332.0</td>\n",
       "      <td>300.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1993-09-03</th>\n",
       "      <td>1300.0</td>\n",
       "      <td>1330.0</td>\n",
       "      <td>1300.0</td>\n",
       "      <td>1330.0</td>\n",
       "      <td>287.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1993-09-06</th>\n",
       "      <td>1299.0</td>\n",
       "      <td>1318.0</td>\n",
       "      <td>1297.0</td>\n",
       "      <td>1318.0</td>\n",
       "      <td>210.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1993-09-07</th>\n",
       "      <td>1339.0</td>\n",
       "      <td>1355.0</td>\n",
       "      <td>1283.0</td>\n",
       "      <td>1295.0</td>\n",
       "      <td>1004.0</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "                      close    high     low    open  volume\n",
       "contract date                                              \n",
       "199309   1993-09-01  1336.0  1338.0  1313.0  1320.0   560.0\n",
       "         1993-09-02  1339.0  1345.0  1330.0  1332.0   300.0\n",
       "         1993-09-03  1300.0  1330.0  1300.0  1330.0   287.0\n",
       "         1993-09-06  1299.0  1318.0  1297.0  1318.0   210.0\n",
       "         1993-09-07  1339.0  1355.0  1283.0  1295.0  1004.0"
      ]
     },
     "execution_count": 99,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "i['robusta'].contracts().head()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "#### Getting all the data for a single contract.\n",
    "\n",
    "Contracts are named after the expiration month in the following format YYYYMM. These names are integers."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 100,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>close</th>\n",
       "      <th>high</th>\n",
       "      <th>low</th>\n",
       "      <th>open</th>\n",
       "      <th>volume</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>date</th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>2018-01-17</th>\n",
       "      <td>1863.0</td>\n",
       "      <td>1830.0</td>\n",
       "      <td>1830.0</td>\n",
       "      <td>1830.0</td>\n",
       "      <td>4.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2018-02-19</th>\n",
       "      <td>1835.0</td>\n",
       "      <td>1851.0</td>\n",
       "      <td>1851.0</td>\n",
       "      <td>1851.0</td>\n",
       "      <td>16.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2018-02-22</th>\n",
       "      <td>1844.0</td>\n",
       "      <td>1847.0</td>\n",
       "      <td>1847.0</td>\n",
       "      <td>1847.0</td>\n",
       "      <td>20.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2018-03-01</th>\n",
       "      <td>1846.0</td>\n",
       "      <td>1846.0</td>\n",
       "      <td>1846.0</td>\n",
       "      <td>1846.0</td>\n",
       "      <td>20.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2018-03-02</th>\n",
       "      <td>1827.0</td>\n",
       "      <td>1829.0</td>\n",
       "      <td>1829.0</td>\n",
       "      <td>1829.0</td>\n",
       "      <td>2.0</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "             close    high     low    open  volume\n",
       "date                                              \n",
       "2018-01-17  1863.0  1830.0  1830.0  1830.0     4.0\n",
       "2018-02-19  1835.0  1851.0  1851.0  1851.0    16.0\n",
       "2018-02-22  1844.0  1847.0  1847.0  1847.0    20.0\n",
       "2018-03-01  1846.0  1846.0  1846.0  1846.0    20.0\n",
       "2018-03-02  1827.0  1829.0  1829.0  1829.0     2.0"
      ]
     },
     "execution_count": 100,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "i['robusta'].contracts().loc[201907].head()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "#### Easy stitching\n",
    "\n",
    "Our intruments know how to do Panama stitching: we do that by calling `panama_prices()`"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 101,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAYkAAAEACAYAAABGYoqtAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDIuMS4wLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvpW3flQAAIABJREFUeJztnXecFOX9+N+f6xwc/egoHQUVFARR7KhYImqisfxssSYaE6NJUJN8NWo0GjUxloiJxhiNGkssYAF7A6X33ov0fnD1+f0xM3uzuzN7e3dbZvc+79frXjf7zMzu82yZz3y6GGNQFEVRFC9y0j0BRVEUJbiokFAURVF8USGhKIqi+KJCQlEURfFFhYSiKIriiwoJRVEUxZekCwkRWSkic0RkpohMtcfaishEEVli/29jj4uIPCoiS0Vktogckez5KYqiKP6kSpM40Rgz2Bgz1H48FvjQGNMX+NB+DHA60Nf+uxZ4MkXzUxRFUTxIl7lpDPCcvf0ccI5r/F/GYjLQWkQ6p2OCiqIoSmqEhAE+EJFpInKtPdbRGLPB3v4O6GhvdwXWuM5da4+FISLXishU++/ayP2KoihKYshLwWuMNMasE5EOwEQRWejeaYwxIlKv2iDGmHHAOID27duboUOHPpW46SqKomQ/06ZN22KMKa3ruKQLCWPMOvv/JhF5AxgGbBSRzsaYDbY5aZN9+Dqgu+v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NcYYxamcv6KEi8qJBSlnojIEKwS8MOxSttMB/6GVbJhq33MPcBGY8xfReSfwDvGmFftfR8C1xtjlojIcKwS1CdFv5KipJ+01m5SlAzlWOANp/S7iDjVQQ+xhUNrrMZU70eeKCItgKOB/7oqSxcmfcaK0kBUSChK4vgncI4xZpaIXIFV8DGSHGCHMWZwCuelKA1GHdeKUn8+A84RkWYiUgJ8zx4vATaISD5W1VCH3fY+7PLSK0TkfLBKUYvIoNRNXVHqhwoJRaknxpjpwMtYze7fxepbDvBbYApWj3O3I/ol4JciMkNEemMJkKtEZBYwD6svsqIEEnVcK4qiKL6oJqEoiqL4okJCURRF8UWFhKIoiuKLCglFURTFFxUSiqIoii8qJBRFURRfVEgoiqIovvx//9DpmdQMYaAAAAAASUVORK5CYII=\n",
      "text/plain": [
       "<matplotlib.figure.Figure at 0x7f76b81a9b00>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "i['cocoa'].panama_prices().plot()\n",
    "plt.show()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "#### Market price of the stitched series"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 69,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "date        contract\n",
       "2018-03-26  201809      1840.0\n",
       "2018-03-27  201809      1795.0\n",
       "2018-03-28  201809      1827.0\n",
       "2018-03-29  201809      1789.0\n",
       "2018-04-03  201809      1776.0\n",
       "Name: close, dtype: float64"
      ]
     },
     "execution_count": 69,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "i['cocoa'].market_price().tail()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "#### The stitching is done according to a roll progression that we can examine by calling `roll_progression()`:"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 102,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "date\n",
       "1960-03-01    196009\n",
       "1960-03-02    196009\n",
       "1960-03-03    196009\n",
       "1960-03-04    196009\n",
       "1960-03-05    196009\n",
       "Freq: D, Name: contract, dtype: int64"
      ]
     },
     "execution_count": 102,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "i['cocoa'].roll_progression().head()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "#### Given one contract we can find the one after:"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 103,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "199312"
      ]
     },
     "execution_count": 103,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "i['cocoa'].next_contract(199309)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "#### Compute a contract's term structure"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 104,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>close</th>\n",
       "      <th>high</th>\n",
       "      <th>low</th>\n",
       "      <th>open</th>\n",
       "      <th>volume</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>contract</th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>201809</th>\n",
       "      <td>1776.0</td>\n",
       "      <td>1818.0</td>\n",
       "      <td>1755.0</td>\n",
       "      <td>1815.0</td>\n",
       "      <td>4688.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>201812</th>\n",
       "      <td>1776.0</td>\n",
       "      <td>1815.0</td>\n",
       "      <td>1758.0</td>\n",
       "      <td>1812.0</td>\n",
       "      <td>2697.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>201903</th>\n",
       "      <td>1766.0</td>\n",
       "      <td>1803.0</td>\n",
       "      <td>1747.0</td>\n",
       "      <td>1796.0</td>\n",
       "      <td>2026.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>201909</th>\n",
       "      <td>1779.0</td>\n",
       "      <td>1812.0</td>\n",
       "      <td>1809.0</td>\n",
       "      <td>1809.0</td>\n",
       "      <td>103.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>201912</th>\n",
       "      <td>1783.0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>6.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>202003</th>\n",
       "      <td>1794.0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "           close    high     low    open  volume\n",
       "contract                                        \n",
       "201809    1776.0  1818.0  1755.0  1815.0  4688.0\n",
       "201812    1776.0  1815.0  1758.0  1812.0  2697.0\n",
       "201903    1766.0  1803.0  1747.0  1796.0  2026.0\n",
       "201909    1779.0  1812.0  1809.0  1809.0   103.0\n",
       "201912    1783.0     NaN     NaN     NaN     6.0\n",
       "202003    1794.0     NaN     NaN     NaN     NaN"
      ]
     },
     "execution_count": 104,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "i['cocoa'].term_structure()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "#### Find an expiry date"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 105,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "datetime.date(1993, 9, 15)"
      ]
     },
     "execution_count": 105,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "i['cocoa'].expiry_date(199309)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "#### Compute a series of the next expiry date at each date"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 108,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "date\n",
       "1960-03-01   1960-09-15\n",
       "1960-03-02   1960-09-15\n",
       "1960-03-03   1960-09-15\n",
       "1960-03-04   1960-09-15\n",
       "1960-03-05   1960-09-15\n",
       "Freq: D, Name: contract, dtype: datetime64[ns]"
      ]
     },
     "execution_count": 108,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "i['cocoa'].expiries().head()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "#### Compute a series of the number of days to the next expiry date, one of each date"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 109,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "date\n",
       "1960-03-01    198\n",
       "1960-03-02    197\n",
       "1960-03-03    196\n",
       "1960-03-04    195\n",
       "1960-03-05    194\n",
       "Freq: D, dtype: int64"
      ]
     },
     "execution_count": 109,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "i['cocoa'].time_to_expiry().head()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "#### Compute forecasts.\n",
    "\n",
    "The computed quantities are the ones defined in `config/strategy.py`"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 71,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>ewmac8</th>\n",
       "      <th>ewmac16</th>\n",
       "      <th>ewmac32</th>\n",
       "      <th>ewmac64</th>\n",
       "      <th>carry</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>date</th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>1994-09-07</th>\n",
       "      <td>-7.298933</td>\n",
       "      <td>-3.923348</td>\n",
       "      <td>1.398090</td>\n",
       "      <td>3.150118</td>\n",
       "      <td>-8.423985</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1994-09-08</th>\n",
       "      <td>-7.547778</td>\n",
       "      <td>-4.507797</td>\n",
       "      <td>0.857219</td>\n",
       "      <td>2.859416</td>\n",
       "      <td>-8.456492</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1994-09-09</th>\n",
       "      <td>-7.201781</td>\n",
       "      <td>-4.762236</td>\n",
       "      <td>0.474475</td>\n",
       "      <td>2.636796</td>\n",
       "      <td>-8.491867</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1994-09-12</th>\n",
       "      <td>-7.249737</td>\n",
       "      <td>-5.176379</td>\n",
       "      <td>0.009795</td>\n",
       "      <td>2.368496</td>\n",
       "      <td>-8.525330</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1994-09-13</th>\n",
       "      <td>-6.903029</td>\n",
       "      <td>-5.359104</td>\n",
       "      <td>-0.341077</td>\n",
       "      <td>2.148404</td>\n",
       "      <td>-8.558792</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "              ewmac8   ewmac16   ewmac32   ewmac64     carry\n",
       "date                                                        \n",
       "1994-09-07 -7.298933 -3.923348  1.398090  3.150118 -8.423985\n",
       "1994-09-08 -7.547778 -4.507797  0.857219  2.859416 -8.456492\n",
       "1994-09-09 -7.201781 -4.762236  0.474475  2.636796 -8.491867\n",
       "1994-09-12 -7.249737 -5.176379  0.009795  2.368496 -8.525330\n",
       "1994-09-13 -6.903029 -5.359104 -0.341077  2.148404 -8.558792"
      ]
     },
     "execution_count": 71,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "i['cocoa'].forecasts().head()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "#### Plot volumes"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 111,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "<matplotlib.axes._subplots.AxesSubplot at 0x7f76b80b36d8>"
      ]
     },
     "execution_count": 111,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAYAAAAEmCAYAAABrgkdMAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDIuMS4wLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvpW3flQAAIABJREFUeJztnXm4HVWVt99FEhljCBABEySIzDKIiCBOTIKCQHeLoLai0iKKQ2urHbWVODa2jdr6IbYKGmwVbVBBHBAJIjYiBAiBJISEMQlTyASZp/X9sVZxiuKce8/Nnc5N/d7nOc+pVbX2rlV779qr9lC7zN0RQghRPzYbbAOEEEIMDnIAQghRU+QAhBCipsgBCCFETZEDEEKImiIHIIQQNUUOQAghaoocgBBC1BQ5ACGEqCnDB9uArthhhx18/Pjxg22GEEIMKW699dYn3H1Md3od7QDGjx/PlClTBtsMIYQYUpjZg+3oqQtICCFqihyAEELUFDkAIYSoKXIAQghRU+QAhBCipsgBCCFETZEDEE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/k3sRVt7CdYsdQDNspdgyJsFl/9uiLYINe4TdxABeRn0SryjT/7F1ZvrcS9t4hELY3cf0S2Kmk+7RMOIhxJfmUiu4pXeh2J/cmrrqF7RQ7hmLYTrFjSISt1KPPkFv9Om4WkBBCiIFhs8E2QAghxOAgByCEEDVFDkCIHmBm483srX0Y3ylmtm9fxSdET5ADEKJnjAeaOgAz25hp1acQ374QYsDRILCoFWb2DmIJZie+xvUZ4GLi494LiLetHzKzHxIf5jkE2IlYn+oyM7uJ+FjP/cQ6VYuJpcu3IdZjOYFYj3008Z7Gv7n7FS3OfSFwFbA0f//g8UFvIQYEOQBRG8xsP2Kq7Cvc/Qkz246oxC9z90lm9m7gJHc/JR3A1sBpxCcbr3T3F5nZa4GPufuJGec7gS8CB7j7omwFbOXuT5rZDsQaLnsQT/nPOHfq/xC4yt0vG7CEECJRF5CoE0cB/+vuTwB4rJZ4OPF+BcCPiAW3Cn7l7hvcfQaNL6414xpvrLxowJfzjfY/Et9v2LHFuYUYVDpuKQghOojVpe2uXq1fXtp+G/HR95e6+1oze4D4rJ8QHYdaAKJOTAZONbPiq2nbATcCp+fxtxFfY+uKp4hPc7ZiFPB4Vv5HEst0tDp3O/EJ0W+oBSBqg7tPN7MvAdeb2XrgduCDwA/M7OPkIHA30UwD1pvZHcSnORdXjv8Y+LWZ3Umsznh3F+d+J/E5z++Z2YeAN2kQWAwkGgQWQoiaoi4gIYSoKXIAQghRU+QAhBCipsgBCCFETZEDEEKImiIHIIQQNUUOQAghaoocgBBC1JT/Dwg14XBV1anFAAAAAElFTkSuQmCC\n",
      "text/plain": [
       "<matplotlib.figure.Figure at 0x7f76b82814e0>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "i['cocoa'].contract_volumes()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.5.2"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
